Skip to content

Instantly share code, notes, and snippets.

@gorborukov
gorborukov / russia
Last active January 15, 2026 10:43
Регионы и города россии в формате JSON
[
{
"region": "Москва и Московская обл.",
"city": "Москва"
},
{
"region": "Москва и Московская обл.",
"city": "Абрамцево"
},
@PrenSJ2
PrenSJ2 / INSTAGRAM_SETUP.md
Last active January 15, 2026 10:41
A comprehensive guide for implementing Instagram content publishing using the Instagram Platform API (Instagram Direct Login) that launched in July 2024.

Instagram Platform API Integration Guide (Oct 2025)

This guide provides complete setup instructions for Instagram integration using the Instagram Platform API (Instagram Direct Login) that launched in July 2024.

Overview

The Instagram Platform API allows direct authentication with Instagram accounts without requiring a Facebook Page connection. This implementation supports both Business and Creator accounts for content publishing.

Prerequisites

@dkaraush
dkaraush / oklch2rgb.js
Last active January 15, 2026 10:34
conversion OKLCH into RGB and RGB into OKLCH in js, simplified
const multiplyMatrices = (A, B) => {
return [
A[0]*B[0] + A[1]*B[1] + A[2]*B[2],
A[3]*B[0] + A[4]*B[1] + A[5]*B[2],
A[6]*B[0] + A[7]*B[1] + A[8]*B[2]
];
}
const oklch2oklab = ([l, c, h]) => [
l,
@hamakn
hamakn / codes.md
Created March 15, 2019 11:00
gRPC Code and HTTP Status Code
@bennettmcelwee
bennettmcelwee / stringify.js
Last active January 15, 2026 10:32
Version of JSON.stringify limitied to a specific depth.
// Similar to JSON.stringify but limited to a specified depth (default 1)
// The approach is to prune the object first, then just call JSON.stringify to do the formatting
const prune = (obj, depth = 1) => {
if (Array.isArray(obj) && obj.length > 0) {
return (depth === 0) ? ['???'] : obj.map(e => prune(e, depth - 1))
} else if (obj && typeof obj === 'object' && Object.keys(obj).length > 0) {
return (depth === 0) ? {'???':''} : Object.keys(obj).reduce((acc, key) => ({ ...acc, [key]: prune(obj[key], depth - 1)}), {})
} else {
return obj
@patchthecode
patchthecode / reset_idea_trial.sh
Created June 29, 2021 22:50 — forked from gulrich1/reset_idea_trial.sh
reset intellij trial
#!/bin/sh
#https://github.com/PythonicNinja/jetbrains-reset-trial-mac-osx/blob/master/runme.sh
for product in IntelliJIdea WebStorm DataGrip PhpStorm CLion PyCharm GoLand RubyMine Rider; do
echo "Closing $product"
ps aux | grep -i MacOs/$product | cut -d " " -f 5 | xargs kill -9
echo "Resetting trial period for $product"
@mrkline
mrkline / c_sharp_for_python.md
Last active January 15, 2026 10:31
An intro to C# for a Python developer. Made for one of my coworkers.

C# For Python Programmers

Syntax and core concepts

Basic Syntax

  • Single-line comments are started with //. Multi-line comments are started with /* and ended with */.

  • C# uses braces ({ and }) instead of indentation to organize code into blocks. If a block is a single line, the braces can be omitted. For example,

@Steveplays28
Steveplays28 / distant_horizons_shader_compatibility_information.md
Last active January 15, 2026 10:27
Distant Horizons shader compatibility info

Distant Horizons shader compatibility information

Distant Horizons v2.0.0 (and up) shader compatibility information.

v2

Install guide

Fabric

@jweinst1
jweinst1 / write_o1_hash.cpp
Last active January 15, 2026 10:24
write o1 hashmap
#include <iostream>
#include <vector>
#include <unordered_map>
#include <random>
#include <chrono>
#include <cstdint>
#include <limits>
#include <cstring>